package edu.hgnc.cglib;

import edu.hgnc.aop.xml.service.Calculator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Service;

@Service
public class MyCalculator implements Calculator {

	private static final Log logger = LogFactory.getLog(MyCalculator.class);


	public int add(int i, int j) {
		return i + j;
	}

	public Integer sub(Integer i,Integer j) throws NoSuchMethodException{
		return i-j;
	}

	public Integer mul(Integer i,Integer j) throws NoSuchMethodException{
		return i*j;
	}

	public Integer div(Integer i,Integer j) throws NoSuchMethodException{
		return i/j;
	}

	public Integer show(Integer i) throws NoSuchMethodException{
		logger.debug("-----------------------show----------------------------");
		return i;
	}
}
